var mongoose = require('./mongoConn');
var Schema = mongoose.Schema;
var _ = require("underscore");

//定义model的规范
var newSchema = new Schema({
    _id: Number,//权限ID
    text: String, //权限名称
    access_url: String,//可访问url
    nodes: []//子权限
});

//注册model
mongoose.model("UserPermission", newSchema);

//获得Model
var UserPermission = mongoose.model("UserPermission");

module.exports = UserPermission;